package com.aisino.nmg.ssm;

import com.aisino.nmg.SSMProject;
import com.aisino.nmg.ant.GeneratorUtil;
import com.aisino.nmg.ant.task.GeneratorToolTask;
import com.aisino.nmg.operator.GeneratorProjectCodeOperation;
import com.aisino.nmg.operator.GeneratorProjectFrameOperation;
import com.aisino.nmg.operator.GeneratorProjectResourceOperation;

public class GeneratorFactory {
	private static SSMProject ssmProject = new SSMProject("cms", "com.aisino.nmg.cms");

	public static void generatorProjectFrameOperation() {
		GeneratorToolTask generatorToolTask = GeneratorUtil.getGeneraterToolTask(ssmProject);
		GeneratorProjectFrameOperation projectFrameOperation = new GeneratorProjectFrameOperation(generatorToolTask);
		projectFrameOperation.run();
	}

	public static void generatorProjectCodeOperation() {
		GeneratorToolTask generatorToolTask = GeneratorUtil.getGeneraterToolTask(ssmProject);
		GeneratorProjectCodeOperation projectCodeOperation = new GeneratorProjectCodeOperation(generatorToolTask);
		projectCodeOperation.run();
	}

	public static void generatorProjectResourceOperation() {
		GeneratorToolTask generatorToolTask = GeneratorUtil.getGeneraterToolTask(ssmProject);
		GeneratorProjectResourceOperation projectResourceOperation = new GeneratorProjectResourceOperation(generatorToolTask);
		projectResourceOperation.run();
	}
}
